const express = require('express')

const data = require('./data.json')

const app = express()

app.get('/api/seller', (req, res) => {
  res.json({
    data: data.seller,
  })
})

app.get('/api/goods', (req, res) => {
  res.json({
    data: data.goods,
  })
})

app.get('/api/ratings', (req, res) => {
  res.json({
    data: data.ratings,
  })
})

app.listen(3006, () => {
  console.log('服务器已启动完毕：http://localhost:3006')
})
